#ifndef __KALMANFILTER_H_
#define __KALMANFILTER_H_

// 卡尔曼滤波结构体
typedef struct
{
    float x; // SOC状态估计
    float P; // SOC状态估计的协方差
    float Q; // 过程噪声协方差
    float R; // 测量噪声协方差
} KalmanFilter_t;

void Kalman_Init(KalmanFilter_t *kf, float initial_state, float initial_covariance, float process_noise, float measurement_noise);
void Kalman_update(KalmanFilter_t *kf, float z);

#endif
